package com.zoe.vhr.controller;

import com.zoe.vhr.model.Menu;
import com.zoe.vhr.service.MenuService;
import com.zoe.vhr.util.R;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @Author Zoe.Zhang
 * @Date: 2021/07/29
 * @Description Menu菜单 /menus/listMenusByRId
 */
@RestController
@RequestMapping("/menus")
public class MenuController {
    @Autowired
    MenuService menuService;

    @GetMapping("/listMenusByRId")
    public R listMenusByRoleId() {
        List<Menu> menus = menuService.listMenusByRid();
        return R.success(menus);
    }
}
